﻿@model Scribble.Post

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Get</title>
</head>
<body>
    <fieldset>
        <legend>Post</legend>
    
        <div class="display-label">Title</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Title)
        </div>
    
        <div class="display-label">UrlTitle</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.UrlTitle)
        </div>
    
        <div class="display-label">Summary</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Summary)
        </div>
    
        <div class="display-label">Body</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Body)
        </div>
    
        <div class="display-label">PublishDate</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PublishDate)
        </div>

        <div class="display-label">Category</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Category.Title)
        </div>

        <div class="display-label">Tags</div>
        <div class="display-field">
            @foreach (var tag in Model.Tags)
            {
                @Html.ActionLink(@tag.Title, "ListByTag", new { urlTitle = tag.UrlTitle }) 
            }
        </div>

        <div class="display-label">Comments</div>
        <div class="display-field">
            @foreach (var comment in Model.Comments)
            {
                @comment.Name

                @comment.Email

                @comment.Website

                @comment.Date

                @comment.Text
            }
        </div>
    </fieldset>
    <p>
        @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
        @Html.ActionLink("Back to List", "Index")
    </p>
</body>
</html>
